// import { GetListTeamType, selectQueryParam, GetListCarType, GetListEquipmentType, GetListSuppliesType } from "@/api/EmergencyDisposal/zydp.js";
export const bianji = ["zhanwei", "peopleCount", "creator", "creatorUnit", "createTime", "contactWay", "applyUnit"]; // 编辑时禁用
export const shenpi = [
  "zhanwei",
  "sourceInfoId",
  "resourceApplyName",
  "applyUnit",
  "applyEvel",
  "peopleCount",
  "acceptUnit",
  "destination",
  "expectArrivalTime",
  "contactId",
  "contactWay",
  "oApprovalId",
  "applyDescription",
  "creatorUnit",
  "createTime",
  "creator",
  "approvalUser",
  "approvalDept",
  "approvalTime",
  "tApprovalUser",
  "tApprovalDept",
  "tApprovalTime",
  "teamTypeName",
  "teamMajorName",
  "memberMajorName",
  "memberAbilityName",
  "vehiclePropertiesName",
  "vehicleUsageName",
  "vehicleTypeName",
  "largeCategoryName",
  "middleCategoryName",
  "smallCategoryName",
  "parametersName",
  "largeCategoryName",
  "middleCategoryName",
  "smallCategoryName",
  "count",
  "remark"
];// 审批时禁用
// 队伍
export function TeamFormDialog(target) {
  return {
    dialogConfig: {
      title: "队伍申请单",
      destroyOnClose: true,
      isShow: false,
      btnList: [
        {
          name: "提交",
          type: "primary",
          id: "submit",
          size: "small"
        },
        {
          name: "保存",
          id: "submit",
          size: "small"
        },
        {
          name: "取消",
          id: "cancel",
          size: "small"
        }
      ]
    },
    // 折叠面板信息
    titleConfig: [
      {
        title: "信息来源",
        name: "1",
        slot: "slot1"
      },
      {
        title: "申请信息",
        name: "2",
        slot: "slot2"
      },
      {
        title: "需求明细表",
        name: "3",
        slot: "slot3"
      },
      {
        title: "填报信息",
        name: "4",
        slot: "slot4"
      }
    ],
    formConfig1: {
      formData: [
        {
          type: "select",
          label: "响应命令单",
          prop: "sourceInfoId",
          name: "sourceInfo",
          class: "sjgy",
          options: []
        }
      ]
    },
    formConfig2: {
      formData: [
        {
          type: "input",
          label: "资源申请单",
          prop: "resourceApplyName",
          class: "sjgy"
        },
        {
          type: "input",
          label: "申请单位",
          prop: "applyUnit",
          class: "third"
        },
        // {
        //   type: "selectTree",
        //   label: "申请单位",
        //   prop: "applyUnit",
        //   name: "applyUnitId",
        //   title: "申请单位选择",
        //   keyWord: "applyUnits", // 搜索关键字，同一表单需要绑定唯一值
        //   treeRef: "applyUnitRef", // 树结构绑定的ref，同一表单需绑定唯一值
        //   commonClick: true, // 是否使用默认点击事件，
        //   clickClose: false, // 判断是否点击选择单位后是否立刻关闭弹窗，
        //   choose: false, // 判断是否可以多选
        //   ref: "applyUnit_select", // 同一表单需要绑定唯一ref，用于关闭对应弹窗
        //   class: "third",
        //   lableWidth: "151px",
        //   treeData: {
        //     data: [],
        //     default: ["1"],
        //     checked: [],
        //     props: {
        //       children: "children",
        //       label: "orgName",
        //       value: "id"
        //     }
        //   }
        // },
        {
          type: "select",
          label: "需求等级",
          prop: "applyEvel",
          name: "applyEvelName",
          class: "third",
          options: []
        },
        {
          type: "input",
          label: "需求人数",
          prop: "peopleCount",
          class: "third"
        },
        {
          type: "selectTree",
          label: "受理单位及部门",
          prop: "acceptUnit",
          name: "acceptUnitId",
          title: "受理单位及部门选择",
          keyWord: "acceptUnits", // 搜索关键字，同一表单需要绑定唯一值
          treeRef: "acceptUnitRef", // 树结构绑定的ref，同一表单需绑定唯一值
          commonClick: true, // 是否使用默认点击事件，
          clickClose: false, // 判断是否点击选择单位后是否立刻关闭弹窗，
          choose: false, // 判断是否可以多选
          isSplice: true, // 单位部门拼接
          ref: "acceptUnit_select", // 同一表单需要绑定唯一ref，用于关闭对应弹窗
          class: "third",
          lableWidth: "151px",
          treeData: {
            data: [],
            default: ["1"],
            checked: [],
            props: {
              children: "children",
              label: "orgName",
              value: "id"
            }
          }
        },
        {
          type: "input",
          label: "目的地点",
          prop: "destination",
          class: "third"
        },
        {
          type: "dataPicker",
          dateType: "datetime",
          label: "期望到达时间",
          prop: "expectArrivalTime",
          class: "third"
        },
        {
          type: "select",
          label: "联系人",
          prop: "contactId",
          name: "contact",
          class: "third",
          filterable: true,
          options: []
        },
        {
          type: "input",
          label: "联系方式",
          prop: "contactWay",
          class: "third"
        },
        {
          type: "input",
          label: "",
          prop: "zhanwei",
          class: "third"
        },
        {
          type: "textarea",
          label: "需求描述",
          prop: "applyDescription",
          class: "sjgy"
        }
      ]
    },
    formConfig3: {
      // 表格信息
      table: {
        compRef: "zysq",
        isSequenceFlag: true,
        isShowPage: true,
        resetFlag: true,
        loading: false,
        autoHeight: true,
        tableData: [
          {
            teamTypeCode: "",
            teamTypeName: "",
            teamMajorCode: "",
            teamMajorName: "",
            memberMajorCode: "",
            memberMajorName: "",
            memberAbilityCode: "",
            memberAbilityName: "",
            count: "",
            remark: ""
          }
        ],
        columns: [
          {
            prop: "teamTypeName",
            label: "队伍类型",
            align: "center",
            tooltip: true,
            render: (h, { row, $index }) => {
              if (target.requestDialog.disableKeys.includes("teamTypeName")) {
                return (
                  <el-form-item prop={`tableData.${$index}.teamTypeName`}>
                    <div>
                      {target.dialogForm.tableData[$index].teamTypeName}
                    </div>
                  </el-form-item >
                );
              } else {
                return (
                  <el-form-item prop={`tableData.${$index}.teamTypeCode`} rules={target.tableForm.rules.teamTypeCode}>
                    <HpSelect
                      value={target.dialogForm.tableData[$index].teamTypeName}
                      vOn:input={(e) => {
                        target.dialogForm.tableData[$index].teamTypeCode = e.id;
                        target.dialogForm.tableData[$index].teamTypeName = e.dicName;
                      }}
                      options={target.selectOptions.teamType} />
                  </el-form-item >
                );
              }
            }
          },
          {
            prop: "teamMajorName",
            label: "队伍专业",
            align: "center",
            tooltip: true,
            render: (h, { row, $index }) => {
              if (target.requestDialog.disableKeys.includes("teamMajorName")) {
                return (
                  <el-form-item prop={`tableData.${$index}.teamMajorName`}>
                    <div>
                      {target.dialogForm.tableData[$index].teamMajorName}
                    </div>
                  </el-form-item >
                );
              } else {
                return (
                  <el-form-item prop={`tableData.${$index}.teamMajorCode`} rules={target.tableForm.rules.teamMajorCode}>
                    <HpSelect
                      value={target.dialogForm.tableData[$index].teamMajorName}
                      vOn:input={(e) => {
                        target.dialogForm.tableData[$index].teamMajorCode = e.id;
                        target.dialogForm.tableData[$index].teamMajorName = e.dicName;
                      }}
                      options={target.selectOptions.teamMajor} />
                  </el-form-item >
                );
              }
            }
          },
          {
            prop: "memberMajorName",
            label: "人员专业",
            align: "center",
            tooltip: true,
            render: (h, { row, $index }) => {
              if (target.requestDialog.disableKeys.includes("memberMajorName")) {
                return (
                  <el-form-item prop={`tableData.${$index}.memberMajorName`}>
                    <div>
                      {target.dialogForm.tableData[$index].memberMajorName}
                    </div>
                  </el-form-item >
                );
              } else {
                return (
                  <el-form-item prop={`tableData.${$index}.memberMajorCode`} rules={target.tableForm.rules.memberMajorCode}>
                    <HpSelect
                      value={target.dialogForm.tableData[$index].memberMajorName}
                      vOn:input={(e) => {
                        target.dialogForm.tableData[$index].memberMajorCode = e.id;
                        target.dialogForm.tableData[$index].memberMajorName = e.dicName;
                      }}
                      options={target.selectOptions.memberMajor} />
                  </el-form-item >
                );
              }
            }
          },
          {
            prop: "memberAbilityName",
            label: "特种作业能力",
            align: "center",
            tooltip: true,
            render: (h, { row, $index }) => {
              if (target.requestDialog.disableKeys.includes("memberAbilityName")) {
                return (
                  <el-form-item prop={`tableData.${$index}.memberAbilityName`}>
                    <div>
                      {target.dialogForm.tableData[$index].memberAbilityName}
                    </div>
                  </el-form-item >
                );
              } else {
                return (
                  <el-form-item prop={`tableData.${$index}.memberAbilityCode`} rules={target.tableForm.rules.memberAbilityCode}>
                    <HpSelect
                      value={target.dialogForm.tableData[$index].memberAbilityName}
                      vOn:input={(e) => {
                        target.dialogForm.tableData[$index].memberAbilityCode = e.id;
                        target.dialogForm.tableData[$index].memberAbilityName = e.dicName;
                      }}
                      options={target.selectOptions.memberAbilityName} />
                  </el-form-item >
                );
              }
            }
          },
          {
            prop: "count",
            label: "需求人数",
            align: "center",
            "min-width": "80px",
            render: (h, { row, $index }) => {
              if (target.requestDialog.disableKeys.includes("count")) {
                return (
                  <el-form-item prop={`tableData.${$index}.count`}>
                    <div>
                      {target.dialogForm.tableData[$index].count}
                    </div>
                  </el-form-item >
                );
              } else {
                return (
                  <el-form-item prop={`tableData.${$index}.count`}>
                    <el-input-number controls-position='right' type='number' min={0} max={999} resize='none' value={target.dialogForm.tableData[$index].count}
                      vOn:input={(e) => { target.dialogForm.tableData[$index].count = e; }}>
                    </el-input-number>
                  </el-form-item>
                );
              }
            }
          },
          {
            prop: "remark",
            label: "备注",
            align: "center",
            "min-width": "180px",
            render: (h, { row, $index }) => {
              if (target.requestDialog.disableKeys.includes("remark")) {
                return (
                  <el-form-item prop={`tableData.${$index}.remark`}>
                    <div>
                      {target.dialogForm.tableData[$index].remark}
                    </div>
                  </el-form-item >
                );
              } else {
                return (
                  <el-form-item prop={`tableData.${$index}.remark`}>
                    <el-input
                      value={target.dialogForm.tableData[$index].remark}
                      vOn:input={(e) => { target.dialogForm.tableData[$index].remark = e; }}
                    ></el-input>
                  </el-form-item>
                );
              }
            }
          },
          {
            label: "操作",
            align: "center",
            "min-width": "60px",
            render: (h, { row, $index }) => {
              return (
                <div v-show={!target.requestDialog.disableKeys.includes("count")} style='cursor: pointer;'>
                  {$index === target.dialogForm.tableData.length - 1 && (
                    <img
                      {...{
                        class: {},
                        style: {
                          width: "16px",
                          height: "16px",
                          "margin": "10px 10px 0 0"
                        },
                        attrs: {
                          src: require("@/assets/img/listAdd.png")
                        },
                        on: {
                          click: () => {
                            target.dialogForm.tableData.push({
                              teamTypeCode: "",
                              teamTypeName: "",
                              teamMajorCode: "",
                              teamMajorName: "",
                              memberMajorCode: "",
                              memberMajorName: "",
                              memberAbilityCode: "",
                              memberAbilityName: "",
                              count: "",
                              remark: ""
                            });
                          }
                        }
                      }}
                    />
                  )
                  }
                  {target.dialogForm.tableData.length > 1 && (
                    <img
                      {...{
                        class: {},
                        style: {
                          width: "16px",
                          height: "16px"
                        },
                        attrs: {
                          src: require("@/assets/img/listReduc.png")
                        },
                        on: {
                          click: () => {
                            target.dialogForm.tableData.splice($index, 1);
                          }
                        }
                      }}
                    />)
                  }
                </div>
              );
            }
          }
        ],
        tableAttr: {
          height: "180px",
          stripe: false,
          border: true,
          fit: true,
          "show-header": true,
          "highlight-current-row": true,
          "cell-style": {
            "font-size": "16px"
          },
          "header-cell-style": {
            "text-align": "center",
            "background-color": "#B1C8F9",
            border: "1px solid #ccc",
            "font-size": "16px"
          }
        }
      }
    },
    formConfig4: {
      formData: [
        {
          type: "select",
          label: "下一步审批人",
          prop: "oApprovalId",
          name: "oApprovalName",
          class: "sjgy",
          options: []
        },
        {
          type: "input",
          label: "填报人",
          prop: "creator",
          class: "third"
        },
        {
          type: "input",
          label: "单位及部门",
          class: "third",
          prop: "creatorUnit"
        },
        {
          type: "dataPicker",
          dateType: "datetime",
          label: "填报时间",
          class: "third",
          prop: "createTime"
        }
      ]
    },
    formConfig5: {
      formData: [
        {
          type: "select",
          label: "下一步审批人",
          prop: "tApprovalId",
          name: "tApprovalName",
          class: "sjgy",
          options: []
        },
        {
          type: "input",
          label: "审批意见",
          prop: "approvalOpinion",
          class: "sjgy"
        },
        {
          type: "input",
          label: "审批人",
          class: "third",
          prop: "approvalUser"
        },
        {
          type: "input",
          label: " 单位及部门",
          class: "third",
          prop: "approvalDept"
        },
        {
          type: "dataPicker",
          dateType: "datetime",
          label: "审批时间",
          class: "third",
          prop: "approvalTime"
        }
      ]
    },
    formConfig6: {
      formData: [
        {
          type: "input",
          label: "审批意见",
          prop: "tApprovalOpintion",
          class: "sjgy"
        },
        {
          type: "input",
          label: "审批人",
          class: "third",
          prop: "tApprovalUser"
        },
        {
          type: "input",
          label: " 单位及部门",
          class: "third",
          prop: "tApprovalDept"
        },
        {
          type: "dataPicker",
          dateType: "datetime",
          label: "审批时间",
          class: "third",
          prop: "tApprovalTime"
        }
      ]
    },
    disableKeys: bianji,
    rules: {
      sourceInfoId: [
        { required: true, message: "请选择响应命令单", trigger: "change" }
      ],
      resourceApplyName: [
        { required: true, message: "请填写资源申请单", trigger: "blur" }
      ],
      applyEvel: [
        { required: true, message: "需求等级", trigger: "change" }
      ],
      acceptUnit: [
        { required: true, message: "受理单位及部门", trigger: "change" }
      ],
      destination: [
        { required: true, message: "目的地点", trigger: "blur" }
      ],
      expectArrivalTime: [
        { required: true, message: "请选择期望到达时间", trigger: "change" }
      ],
      contactId: [
        { required: true, message: "联系人", trigger: "change" }
      ],
      applyDescription: [
        { required: true, message: "需求描述", trigger: "blur" }
      ],
      oApprovalId: [
        { required: true, message: "下一步审批人", trigger: "change" }
      ],
      tApprovalId: [
        { required: true, message: "下一步审批人", trigger: "change" }
      ]
    }
  };
}
// 车辆
export function CarFormDialog(target) {
  return {
    dialogConfig: {
      title: "车辆申请单",
      isShow: false,
      btnList: [
        {
          name: "提交",
          type: "primary",
          id: "submit",
          size: "small"
        },
        {
          name: "保存",
          id: "submit",
          size: "small"
        },
        {
          name: "取消",
          id: "cancel",
          size: "small"
        }
      ]
    },
    // 折叠面板信息
    titleConfig: [
      {
        title: "信息来源",
        name: "1",
        slot: "slot1"
      },
      {
        title: "申请信息",
        name: "2",
        slot: "slot2"
      },
      {
        title: "需求明细表",
        name: "3",
        slot: "slot3"
      },
      {
        title: "填报信息",
        name: "4",
        slot: "slot4"
      }
    ],
    formConfig1: {
      formData: [
        {
          type: "select",
          label: "响应命令单",
          prop: "sourceInfoId",
          name: "sourceInfo",
          class: "sjgy",
          options: []
        }
      ]
    },
    formConfig2: {
      formData: [
        {
          type: "input",
          label: "资源申请单",
          prop: "resourceApplyName",
          class: "sjgy"
        },
        {
          type: "input",
          label: "申请单位",
          prop: "applyUnit",
          class: "third"
        },
        // {
        //   type: "selectTree",
        //   label: "申请单位",
        //   prop: "applyUnit",
        //   name: "applyUnitId",
        //   title: "申请单位选择",
        //   keyWord: "applyUnits", // 搜索关键字，同一表单需要绑定唯一值
        //   treeRef: "applyUnitRef", // 树结构绑定的ref，同一表单需绑定唯一值
        //   commonClick: true, // 是否使用默认点击事件，
        //   clickClose: false, // 判断是否点击选择单位后是否立刻关闭弹窗，
        //   choose: false, // 判断是否可以多选
        //   ref: "applyUnit_select", // 同一表单需要绑定唯一ref，用于关闭对应弹窗
        //   class: "third",
        //   lableWidth: "151px",
        //   treeData: {
        //     data: [],
        //     default: ["1"],
        //     checked: [],
        //     props: {
        //       children: "children",
        //       label: "orgName",
        //       value: "id"
        //     }
        //   }
        // },
        {
          type: "select",
          label: "需求等级",
          prop: "applyEvel",
          name: "applyEvelName",
          class: "third",
          options: []
        },
        {
          type: "input",
          label: "需求数量总和",
          prop: "peopleCount",
          class: "third"
        },
        {
          type: "selectTree",
          label: "受理单位及部门",
          prop: "acceptUnit",
          name: "acceptUnitId",
          title: "受理单位及部门选择",
          keyWord: "acceptUnits", // 搜索关键字，同一表单需要绑定唯一值
          treeRef: "acceptUnitRef", // 树结构绑定的ref，同一表单需绑定唯一值
          commonClick: true, // 是否使用默认点击事件，
          clickClose: false, // 判断是否点击选择单位后是否立刻关闭弹窗，
          choose: false, // 判断是否可以多选
          isSplice: true, // 单位部门拼接
          ref: "acceptUnit_select", // 同一表单需要绑定唯一ref，用于关闭对应弹窗
          class: "third",
          lableWidth: "151px",
          treeData: {
            data: [],
            default: ["1"],
            checked: [],
            props: {
              children: "children",
              label: "orgName",
              value: "id"
            }
          }
        },
        {
          type: "input",
          label: "目的地点",
          prop: "destination",
          class: "third"
        },
        {
          type: "dataPicker",
          dateType: "datetime",
          label: "期望到达时间",
          prop: "expectArrivalTime",
          class: "third"
        },
        {
          type: "select",
          label: "联系人",
          prop: "contactId",
          name: "contact",
          class: "third",
          filterable: true,
          options: []
        },
        {
          type: "input",
          label: "联系方式",
          prop: "contactWay",
          class: "third"
        },
        {
          type: "input",
          label: "",
          prop: "zhanwei",
          class: "third"
        },
        {
          type: "textarea",
          label: "需求描述",
          prop: "applyDescription",
          class: "sjgy"
        }
      ]
    },
    formConfig3: {
      // 表格信息
      table: {
        compRef: "zysq",
        isSequenceFlag: true,
        isShowPage: true,
        resetFlag: true,
        loading: false,
        autoHeight: true,
        tableData: [
          {
            vehiclePropertiesCode: "",
            vehiclePropertiesName: "",
            vehicleUsageCode: "",
            vehicleUsageName: "",
            vehicleTypeCode: "",
            vehicleTypeName: "",
            count: "",
            remark: ""
          }
        ],
        columns: [
          {
            prop: "vehiclePropertiesName",
            label: "车辆性质",
            align: "center",
            tooltip: true,
            "min-width": "100px",
            render: (h, { row, $index }) => {
              if (target.requestDialog.disableKeys.includes("vehiclePropertiesName")) {
                return (
                  <el-form-item prop={`tableData.${$index}.vehiclePropertiesName`}>
                    <div>
                      {target.dialogForm.tableData[$index].vehiclePropertiesName}
                    </div>
                  </el-form-item >
                );
              } else {
                return (
                  <el-form-item prop={`tableData.${$index}.vehiclePropertiesCode`} rules={target.tableForm.rules.vehiclePropertiesCode}>
                    <HpSelect
                      value={target.dialogForm.tableData[$index].vehiclePropertiesName}
                      vOn:input={(e) => {
                        target.dialogForm.tableData[$index].vehiclePropertiesCode = e.id;
                        target.dialogForm.tableData[$index].vehiclePropertiesName = e.dicName;
                      }}
                      options={target.selectOptions.vehicleProperties} />
                  </el-form-item >
                );
              }
            }
          },
          {
            prop: "vehicleUsageName",
            label: "车辆用途",
            align: "center",
            tooltip: true,
            "min-width": "100px",
            render: (h, { row, $index }) => {
              if (target.requestDialog.disableKeys.includes("vehicleUsageName")) {
                return (
                  <el-form-item prop={`tableData.${$index}.vehicleUsageName`}>
                    <div>
                      {target.dialogForm.tableData[$index].vehicleUsageName}
                    </div>
                  </el-form-item >
                );
              } else {
                return (
                  <el-form-item prop={`tableData.${$index}.vehicleUsageCode`} rules={target.tableForm.rules.vehicleUsageCode}>
                    <HpSelect
                      value={target.dialogForm.tableData[$index].vehicleUsageName}
                      vOn:input={(e) => {
                        target.dialogForm.tableData[$index].vehicleUsageCode = e.id;
                        target.dialogForm.tableData[$index].vehicleUsageName = e.dicName;
                      }}
                      options={target.selectOptions.vehicleUsage} />
                  </el-form-item >
                );
              }
            }
          },
          {
            prop: "vehicleTypeName",
            label: "车辆类型",
            align: "center",
            tooltip: true,
            "min-width": "100px",
            render: (h, { row, $index }) => {
              if (target.requestDialog.disableKeys.includes("vehicleTypeName")) {
                return (
                  <el-form-item prop={`tableData.${$index}.vehicleTypeName`}>
                    <div>
                      {target.dialogForm.tableData[$index].vehicleTypeName}
                    </div>
                  </el-form-item >
                );
              } else {
                return (
                  <el-form-item prop={`tableData.${$index}.vehicleTypeCode`} rules={target.tableForm.rules.vehicleTypeCode}>
                    <HpSelect
                      value={target.dialogForm.tableData[$index].vehicleTypeName}
                      vOn:input={(e) => {
                        target.dialogForm.tableData[$index].vehicleTypeCode = e.id;
                        target.dialogForm.tableData[$index].vehicleTypeName = e.dicName;
                      }}
                      options={target.selectOptions.vehicleType} />
                  </el-form-item >
                );
              }
            }
          },
          {
            prop: "count",
            label: "需求数量",
            align: "center",
            "min-width": "80px",
            render: (h, { row, $index }) => {
              if (target.requestDialog.disableKeys.includes("count")) {
                return (
                  <el-form-item prop={`tableData.${$index}.count`}>
                    <div>
                      {target.dialogForm.tableData[$index].count}
                    </div>
                  </el-form-item >
                );
              } else {
                return (
                  <el-form-item prop={`tableData.${$index}.count`}>
                    <el-input-number controls-position='right' type='number' min={0} max={999} resize='none' value={target.dialogForm.tableData[$index].count}
                      vOn:input={(e) => { target.dialogForm.tableData[$index].count = e; }}>
                    </el-input-number>
                  </el-form-item>
                );
              }
            }
          },
          {
            prop: "remark",
            label: "备注",
            align: "center",
            "min-width": "180px",
            render: (h, { row, $index }) => {
              if (target.requestDialog.disableKeys.includes("remark")) {
                return (
                  <el-form-item prop={`tableData.${$index}.remark`}>
                    <div>
                      {target.dialogForm.tableData[$index].remark}
                    </div>
                  </el-form-item >
                );
              } else {
                return (
                  <el-form-item prop={`tableData.${$index}.remark`}>
                    <el-input
                      value={target.dialogForm.tableData[$index].remark}
                      vOn:input={(e) => { target.dialogForm.tableData[$index].remark = e; }}
                    ></el-input>
                  </el-form-item>
                );
              }
            }
          },
          {
            label: "操作",
            align: "center",
            "min-width": "60px",
            render: (h, { row, $index }) => {
              return (
                <div v-show={!target.requestDialog.disableKeys.includes("count")} style='cursor: pointer;'>
                  {$index === target.dialogForm.tableData.length - 1 && (
                    <img
                      {...{
                        class: {},
                        style: {
                          width: "16px",
                          height: "16px",
                          "margin": "10px 10px 0 0"
                        },
                        attrs: {
                          src: require("@/assets/img/listAdd.png")
                        },
                        on: {
                          click: () => {
                            target.dialogForm.tableData.push({
                              vehiclePropertiesCode: "",
                              vehiclePropertiesName: "",
                              vehicleUsageCode: "",
                              vehicleUsageName: "",
                              vehicleTypeCode: "",
                              vehicleTypeName: "",
                              count: "",
                              remark: ""
                            });
                          }
                        }
                      }}
                    />
                  )
                  }
                  {target.dialogForm.tableData.length > 1 && (
                    <img
                      {...{
                        class: {},
                        style: {
                          width: "16px",
                          height: "16px"
                        },
                        attrs: {
                          src: require("@/assets/img/listReduc.png")
                        },
                        on: {
                          click: () => {
                            target.dialogForm.tableData.splice($index, 1);
                          }
                        }
                      }}
                    />)
                  }
                </div>
              );
            }
          }
        ],
        tableAttr: {
          height: "180px",
          stripe: false,
          border: true,
          fit: true,
          "show-header": true,
          "highlight-current-row": true,
          "cell-style": {
            "font-size": "16px"
          },
          "header-cell-style": {
            "text-align": "center",
            "background-color": "#B1C8F9",
            border: "1px solid #ccc",
            "font-size": "16px"
          }
        }
      }
    },
    formConfig4: {
      formData: [
        {
          type: "select",
          label: "下一步审批人",
          prop: "oApprovalId",
          name: "oApprovalName",
          class: "sjgy",
          options: []
        },
        {
          type: "input",
          label: "填报人",
          prop: "creator",
          class: "third"
        },
        {
          type: "input",
          label: "单位及部门",
          class: "third",
          prop: "creatorUnit"
        },
        {
          type: "dataPicker",
          dateType: "datetime",
          label: "填报时间",
          class: "third",
          prop: "createTime"
        }
      ]
    },
    formConfig5: {
      formData: [
        {
          type: "select",
          label: "下一步审批人",
          prop: "tApprovalId",
          name: "tApprovalName",
          class: "sjgy",
          options: []
        },
        {
          type: "input",
          label: "审批意见",
          prop: "approvalOpinion",
          class: "sjgy"
        },
        {
          type: "input",
          label: "审批人",
          class: "third",
          prop: "approvalUser"
        },
        {
          type: "input",
          label: " 单位及部门",
          class: "third",
          prop: "approvalDept"
        },
        {
          type: "dataPicker",
          dateType: "datetime",
          label: "审批时间",
          class: "third",
          prop: "approvalTime"
        }
      ]
    },
    formConfig6: {
      formData: [
        {
          type: "input",
          label: "审批意见",
          prop: "tApprovalOpintion",
          class: "sjgy"
        },
        {
          type: "input",
          label: "审批人",
          class: "third",
          prop: "tApprovalUser"
        },
        {
          type: "input",
          label: " 单位及部门",
          class: "third",
          prop: "tApprovalDept"
        },
        {
          type: "dataPicker",
          dateType: "datetime",
          label: "审批时间",
          class: "third",
          prop: "tApprovalTime"
        }
      ]
    },
    disableKeys: bianji,
    rules: {
      sourceInfoId: [
        { required: true, message: "请选择响应命令单", trigger: "change" }
      ],
      resourceApplyName: [
        { required: true, message: "请填写资源申请单", trigger: "blur" }
      ],
      applyEvel: [
        { required: true, message: "需求等级", trigger: "change" }
      ],
      acceptUnit: [
        { required: true, message: "受理单位及部门", trigger: "change" }
      ],
      destination: [
        { required: true, message: "目的地点", trigger: "blur" }
      ],
      expectArrivalTime: [
        { required: true, message: "请选择期望到达时间", trigger: "change" }
      ],
      contactId: [
        { required: true, message: "联系人", trigger: "change" }
      ],
      applyDescription: [
        { required: true, message: "需求描述", trigger: "blur" }
      ],
      oApprovalId: [
        { required: true, message: "下一步审批人", trigger: "change" }
      ],
      tApprovalId: [
        { required: true, message: "下一步审批人", trigger: "change" }
      ]
    }
  };
}
// 装备
export function EquipmentFormDialog(target) {
  return {
    dialogConfig: {
      title: "装备申请单",
      isShow: false,
      btnList: [
        {
          name: "提交",
          type: "primary",
          id: "submit",
          size: "small"
        },
        {
          name: "保存",
          id: "submit",
          size: "small"
        },
        {
          name: "取消",
          id: "cancel",
          size: "small"
        }
      ]
    },
    // 折叠面板信息
    titleConfig: [
      {
        title: "信息来源",
        name: "1",
        slot: "slot1"
      },
      {
        title: "申请信息",
        name: "2",
        slot: "slot2"
      },
      {
        title: "需求明细表",
        name: "3",
        slot: "slot3"
      },
      {
        title: "填报信息",
        name: "4",
        slot: "slot4"
      }
    ],
    formConfig1: {
      formData: [
        {
          type: "select",
          label: "响应命令单",
          prop: "sourceInfoId",
          name: "sourceInfo",
          class: "sjgy",
          options: []
        }
      ]
    },
    formConfig2: {
      formData: [
        {
          type: "input",
          label: "资源申请单",
          prop: "resourceApplyName",
          class: "sjgy"
        },
        {
          type: "input",
          label: "申请单位",
          prop: "applyUnit",
          class: "third"
        },
        // {
        //   type: "selectTree",
        //   label: "申请单位",
        //   prop: "applyUnit",
        //   name: "applyUnitId",
        //   title: "申请单位选择",
        //   keyWord: "applyUnits", // 搜索关键字，同一表单需要绑定唯一值
        //   treeRef: "applyUnitRef", // 树结构绑定的ref，同一表单需绑定唯一值
        //   commonClick: true, // 是否使用默认点击事件，
        //   clickClose: false, // 判断是否点击选择单位后是否立刻关闭弹窗，
        //   choose: false, // 判断是否可以多选
        //   ref: "applyUnit_select", // 同一表单需要绑定唯一ref，用于关闭对应弹窗
        //   class: "third",
        //   lableWidth: "151px",
        //   treeData: {
        //     data: [],
        //     default: ["1"],
        //     checked: [],
        //     props: {
        //       children: "children",
        //       label: "orgName",
        //       value: "id"
        //     }
        //   }
        // },
        {
          type: "select",
          label: "需求等级",
          prop: "applyEvel",
          name: "applyEvelName",
          class: "third",
          dic: "dic_xqdj",
          options: []
        },
        {
          type: "input",
          label: "需求数量总和",
          prop: "peopleCount",
          class: "third"
        },
        {
          type: "selectTree",
          label: "受理单位及部门",
          prop: "acceptUnit",
          name: "acceptUnitId",
          title: "受理单位及部门选择",
          keyWord: "acceptUnits", // 搜索关键字，同一表单需要绑定唯一值
          treeRef: "acceptUnitRef", // 树结构绑定的ref，同一表单需绑定唯一值
          commonClick: true, // 是否使用默认点击事件，
          clickClose: false, // 判断是否点击选择单位后是否立刻关闭弹窗，
          choose: false, // 判断是否可以多选
          isSplice: true, // 单位部门拼接
          ref: "acceptUnit_select", // 同一表单需要绑定唯一ref，用于关闭对应弹窗
          class: "third",
          lableWidth: "151px",
          treeData: {
            data: [],
            default: ["1"],
            checked: [],
            props: {
              children: "children",
              label: "orgName",
              value: "id"
            }
          }
        },
        {
          type: "input",
          label: "目的地点",
          prop: "destination",
          class: "third"
        },
        {
          type: "dataPicker",
          dateType: "datetime",
          label: "期望到达时间",
          prop: "expectArrivalTime",
          class: "third"
        },
        {
          type: "select",
          label: "联系人",
          prop: "contactId",
          name: "contact",
          class: "third",
          filterable: true,
          options: []
        },
        {
          type: "input",
          label: "联系方式",
          prop: "contactWay",
          class: "third"
        },
        {
          type: "input",
          label: "",
          prop: "zhanwei",
          class: "third"
        },
        {
          type: "textarea",
          label: "需求描述",
          prop: "applyDescription",
          class: "sjgy"
        }
      ]
    },
    formConfig3: {
      // 表格信息
      table: {
        compRef: "zysq",
        isSequenceFlag: true,
        isShowPage: true,
        resetFlag: true,
        loading: false,
        autoHeight: true,
        tableData: [
          {
            largeCategoryCode: "",
            largeCategoryName: "",
            smallCategoryCode: "",
            smallCategoryName: "",
            parametersCode: "",
            parametersName: "",
            count: "",
            remark: ""
          }
        ],
        columns: [
          {
            prop: "largeCategoryName",
            label: "装备大类",
            align: "center",
            tooltip: true,
            "min-width": "100px",
            render: (h, { row, $index }) => {
              if (target.requestDialog.disableKeys.includes("largeCategoryName")) {
                return (
                  <el-form-item prop={`tableData.${$index}.largeCategoryName`}>
                    <div>
                      {target.dialogForm.tableData[$index].largeCategoryName}
                    </div>
                  </el-form-item >
                );
              } else {
                return (
                  <el-form-item prop={`tableData.${$index}.largeCategoryCode`} rules={target.tableForm.rules.largeCategoryCode}>
                    <HpSelect
                      value={target.dialogForm.tableData[$index].largeCategoryName}
                      vOn:input={(e) => {
                        target.dialogForm.tableData[$index].largeCategoryCode = e.id;
                        target.dialogForm.tableData[$index].largeCategoryName = e.dicName;
                      }}
                      options={target.selectOptions.zbLargeCategory} />
                  </el-form-item >
                );
              }
            }
          },
          // {
          //   prop: "middleCategoryName",
          //   label: "装备中类",
          //   align: "center",
          //   "min-width": "100px",
          //   render: (h, { row, $index }) => {
          //     if (target.requestDialog.disableKeys.includes("middleCategoryName")) {
          //       return (
          //         <el-form-item prop={`tableData.${$index}.middleCategoryName`}>
          //           <div>
          //             {target.dialogForm.tableData[$index].middleCategoryName}
          //           </div>
          //         </el-form-item >
          //       );
          //     } else {
          //       return (
          //         <el-form-item prop={`tableData.${$index}.middleCategoryCode`}>
          //           <HpSelect
          //             value={target.dialogForm.tableData[$index].middleCategoryCode}
          //             vOn:input={(e) => { target.dialogForm.tableData[$index].middleCategoryCode = e; }}
          //             config={{
          //               query: () => GetListEquipmentType({ type: "middle" }),
          //               data: []
          //             }} />
          //         </el-form-item >
          //       );
          //     }
          //   }
          // },
          {
            prop: "smallCategoryName",
            label: "装备小类",
            align: "center",
            tooltip: true,
            "min-width": "100px",
            render: (h, { row, $index }) => {
              if (target.requestDialog.disableKeys.includes("smallCategoryName")) {
                return (
                  <el-form-item prop={`tableData.${$index}.smallCategoryName`}>
                    <div>
                      {target.dialogForm.tableData[$index].smallCategoryName}
                    </div>
                  </el-form-item >
                );
              } else {
                return (
                  <el-form-item prop={`tableData.${$index}.smallCategoryCode`} rules={target.tableForm.rules.smallCategoryCode}>
                    <HpSelect
                      value={target.dialogForm.tableData[$index].smallCategoryName}
                      vOn:input={(e) => {
                        target.dialogForm.tableData[$index].smallCategoryCode = e.id;
                        target.dialogForm.tableData[$index].smallCategoryName = e.dicName;
                      }}
                      options={target.selectOptions.zbSmallCategory} />
                  </el-form-item >
                );
              }
            }
          },
          {
            prop: "parametersName",
            label: "型号参数",
            align: "center",
            tooltip: true,
            "min-width": "100px",
            render: (h, { row, $index }) => {
              if (target.requestDialog.disableKeys.includes("parametersName")) {
                return (
                  <el-form-item prop={`tableData.${$index}.parametersName`}>
                    <div>
                      {target.dialogForm.tableData[$index].parametersName}
                    </div>
                  </el-form-item >
                );
              } else {
                return (
                  <el-form-item prop={`tableData.${$index}.parametersCode`} rules={target.tableForm.rules.parametersCode}>
                    <HpSelect
                      value={target.dialogForm.tableData[$index].parametersName}
                      vOn:input={(e) => {
                        target.dialogForm.tableData[$index].parametersCode = e.id;
                        target.dialogForm.tableData[$index].parametersName = e.dicName;
                      }}
                      options={target.selectOptions.parameters} />
                  </el-form-item >
                );
              }
            }
          },
          {
            prop: "count",
            label: "需求数量",
            align: "center",
            "min-width": "80px",
            render: (h, { row, $index }) => {
              if (target.requestDialog.disableKeys.includes("count")) {
                return (
                  <el-form-item prop={`tableData.${$index}.count`}>
                    <div>
                      {target.dialogForm.tableData[$index].count}
                    </div>
                  </el-form-item >
                );
              } else {
                return (
                  <el-form-item prop={`tableData.${$index}.count`}>
                    <el-input-number controls-position='right' type='number' min={0} max={999} resize='none' value={target.dialogForm.tableData[$index].count}
                      vOn:input={(e) => { target.dialogForm.tableData[$index].count = e; }}>
                    </el-input-number>
                  </el-form-item>
                );
              }
            }
          },
          {
            prop: "remark",
            label: "备注",
            align: "center",
            "min-width": "180px",
            render: (h, { row, $index }) => {
              if (target.requestDialog.disableKeys.includes("remark")) {
                return (
                  <el-form-item prop={`tableData.${$index}.remark`}>
                    <div>
                      {target.dialogForm.tableData[$index].remark}
                    </div>
                  </el-form-item >
                );
              } else {
                return (
                  <el-form-item prop={`tableData.${$index}.remark`}>
                    <el-input
                      value={target.dialogForm.tableData[$index].remark}
                      vOn:input={(e) => { target.dialogForm.tableData[$index].remark = e; }}
                    ></el-input>
                  </el-form-item>
                );
              }
            }
          },
          {
            label: "操作",
            align: "center",
            "min-width": "60px",
            render: (h, { row, $index }) => {
              return (
                <div v-show={!target.requestDialog.disableKeys.includes("count")} style='cursor: pointer;'>
                  {$index === target.dialogForm.tableData.length - 1 && (
                    <img
                      {...{
                        class: {},
                        style: {
                          width: "16px",
                          height: "16px",
                          "margin": "10px 10px 0 0"
                        },
                        attrs: {
                          src: require("@/assets/img/listAdd.png")
                        },
                        on: {
                          click: () => {
                            target.dialogForm.tableData.push({
                              largeCategoryCode: "",
                              largeCategoryName: "",
                              smallCategoryCode: "",
                              smallCategoryName: "",
                              parametersCode: "",
                              parametersName: "",
                              count: "",
                              remark: ""
                            });
                          }
                        }
                      }}
                    />
                  )
                  }
                  {target.dialogForm.tableData.length > 1 && (
                    <img
                      {...{
                        class: {},
                        style: {
                          width: "16px",
                          height: "16px"
                        },
                        attrs: {
                          src: require("@/assets/img/listReduc.png")
                        },
                        on: {
                          click: () => {
                            target.dialogForm.tableData.splice($index, 1);
                          }
                        }
                      }}
                    />)
                  }
                </div>
              );
            }
          }
        ],
        tableAttr: {
          height: "180px",
          stripe: false,
          border: true,
          fit: true,
          "show-header": true,
          "highlight-current-row": true,
          "cell-style": {
            "font-size": "16px"
          },
          "header-cell-style": {
            "text-align": "center",
            "background-color": "#B1C8F9",
            border: "1px solid #ccc",
            "font-size": "16px"
          }
        }
      }
    },
    formConfig4: {
      formData: [
        {
          type: "select",
          label: "下一步审批人",
          prop: "oApprovalId",
          name: "oApprovalName",
          class: "sjgy",
          options: []
        },
        {
          type: "input",
          label: "填报人",
          prop: "creator",
          class: "third"
        },
        {
          type: "input",
          label: "单位及部门",
          class: "third",
          prop: "creatorUnit"
        },
        {
          type: "dataPicker",
          dateType: "datetime",
          label: "填报时间",
          class: "third",
          prop: "createTime"
        }
      ]
    },
    formConfig5: {
      formData: [
        {
          type: "select",
          label: "下一步审批人",
          prop: "tApprovalId",
          name: "tApprovalName",
          class: "sjgy",
          options: []
        },
        {
          type: "input",
          label: "审批意见",
          prop: "approvalOpinion",
          class: "sjgy"
        },
        {
          type: "input",
          label: "审批人",
          class: "third",
          prop: "approvalUser"
        },
        {
          type: "input",
          label: "单位及部门",
          class: "third",
          prop: "approvalDept"
        },
        {
          type: "dataPicker",
          dateType: "datetime",
          label: "审批时间",
          class: "third",
          prop: "approvalTime"
        }
      ]
    },
    formConfig6: {
      formData: [
        {
          type: "input",
          label: "审批意见",
          prop: "tApprovalOpintion",
          class: "sjgy"
        },
        {
          type: "input",
          label: "审批人",
          class: "third",
          prop: "tApprovalUser"
        },
        {
          type: "input",
          label: " 单位及部门",
          class: "third",
          prop: "tApprovalDept"
        },
        {
          type: "dataPicker",
          dateType: "datetime",
          label: "审批时间",
          class: "third",
          prop: "tApprovalTime"
        }
      ]
    },
    disableKeys: bianji,
    rules: {
      sourceInfoId: [
        { required: true, message: "请选择响应命令单", trigger: "change" }
      ],
      resourceApplyName: [
        { required: true, message: "请填写资源申请单", trigger: "blur" }
      ],
      applyEvel: [
        { required: true, message: "需求等级", trigger: "change" }
      ],
      acceptUnit: [
        { required: true, message: "受理单位及部门", trigger: "change" }
      ],
      destination: [
        { required: true, message: "目的地点", trigger: "blur" }
      ],
      expectArrivalTime: [
        { required: true, message: "请选择期望到达时间", trigger: "change" }
      ],
      contactId: [
        { required: true, message: "联系人", trigger: "change" }
      ],
      applyDescription: [
        { required: true, message: "需求描述", trigger: "blur" }
      ],
      oApprovalId: [
        { required: true, message: "下一步审批人", trigger: "change" }
      ],
      tApprovalId: [
        { required: true, message: "下一步审批人", trigger: "change" }
      ]
    }
  };
}
// 物资
export function MaterialFormDialog(target) {
  return {
    dialogConfig: {
      title: "物资申请单",
      isShow: false,
      btnList: [
        {
          name: "提交",
          type: "primary",
          id: "submit",
          size: "small"
        },
        {
          name: "保存",
          id: "submit",
          size: "small"
        },
        {
          name: "取消",
          id: "cancel",
          size: "small"
        }
      ]
    },
    // 折叠面板信息
    titleConfig: [
      {
        title: "信息来源",
        name: "1",
        slot: "slot1"
      },
      {
        title: "申请信息",
        name: "2",
        slot: "slot2"
      },
      {
        title: "需求明细表",
        name: "3",
        slot: "slot3"
      },
      {
        title: "填报信息",
        name: "4",
        slot: "slot4"
      }
    ],
    formConfig1: {
      formData: [
        {
          type: "select",
          label: "响应命令单",
          prop: "sourceInfoId",
          name: "sourceInfo",
          class: "sjgy",
          options: []
        }
      ]
    },
    formConfig2: {
      formData: [
        {
          type: "input",
          label: "资源申请单",
          prop: "resourceApplyName",
          class: "sjgy"
        },
        {
          type: "input",
          label: "申请单位",
          prop: "applyUnit",
          class: "third"
        },
        // {
        //   type: "selectTree",
        //   label: "申请单位",
        //   prop: "applyUnit",
        //   name: "applyUnitId",
        //   title: "申请单位选择",
        //   keyWord: "applyUnits", // 搜索关键字，同一表单需要绑定唯一值
        //   treeRef: "applyUnitRef", // 树结构绑定的ref，同一表单需绑定唯一值
        //   commonClick: true, // 是否使用默认点击事件，
        //   clickClose: false, // 判断是否点击选择单位后是否立刻关闭弹窗，
        //   choose: false, // 判断是否可以多选
        //   ref: "applyUnit_select", // 同一表单需要绑定唯一ref，用于关闭对应弹窗
        //   class: "third",
        //   lableWidth: "151px",
        //   treeData: {
        //     data: [],
        //     default: ["1"],
        //     checked: [],
        //     props: {
        //       children: "children",
        //       label: "orgName",
        //       value: "id"
        //     }
        //   }
        // },
        {
          type: "select",
          label: "需求等级",
          prop: "applyEvel",
          name: "applyEvelName",
          class: "third",
          dic: "dic_xqdj",
          options: []
        },
        {
          type: "input",
          label: "需求数量总和",
          isDisabled: true,
          prop: "peopleCount",
          class: "third"
        },
        {
          type: "selectTree",
          label: "受理单位及部门",
          prop: "acceptUnit",
          name: "acceptUnitId",
          title: "受理单位及部门选择",
          keyWord: "acceptUnits", // 搜索关键字，同一表单需要绑定唯一值
          treeRef: "acceptUnitRef", // 树结构绑定的ref，同一表单需绑定唯一值
          commonClick: true, // 是否使用默认点击事件，
          clickClose: false, // 判断是否点击选择单位后是否立刻关闭弹窗，
          choose: false, // 判断是否可以多选
          isSplice: true, // 单位部门拼接
          ref: "acceptUnit_select", // 同一表单需要绑定唯一ref，用于关闭对应弹窗
          class: "third",
          lableWidth: "151px",
          treeData: {
            data: [],
            default: ["1"],
            checked: [],
            props: {
              children: "children",
              label: "orgName",
              value: "id"
            }
          }
        },
        {
          type: "input",
          label: "目的地点",
          prop: "destination",
          class: "third"
        },
        {
          type: "dataPicker",
          dateType: "datetime",
          label: "期望到达时间",
          prop: "expectArrivalTime",
          class: "third"
        },
        {
          type: "select",
          label: "联系人",
          prop: "contactId",
          name: "contact",
          class: "third",
          filterable: true,
          options: []
        },
        {
          type: "input",
          label: "联系方式",
          prop: "contactWay",
          class: "third"
        },
        {
          type: "input",
          label: "",
          prop: "zhanwei",
          class: "third"
        },
        {
          type: "textarea",
          label: "需求描述",
          prop: "applyDescription",
          class: "sjgy"
        }
      ]
    },
    formConfig3: {
      // 表格信息
      table: {
        compRef: "zysq",
        isSequenceFlag: true,
        isShowPage: true,
        resetFlag: true,
        loading: false,
        autoHeight: true,
        tableData: [
          {
            largeCategoryCode: "",
            largeCategoryName: "",
            middleCategoryCode: "",
            middleCategoryName: "",
            smallCategoryCode: "",
            smallCategoryName: "",
            count: "",
            remark: ""
          }
        ],
        columns: [
          {
            prop: "largeCategoryName",
            label: "物资大类",
            align: "center",
            tooltip: true,
            "min-width": "100px",
            render: (h, { row, $index }) => {
              if (target.requestDialog.disableKeys.includes("largeCategoryName")) {
                return (
                  <el-form-item prop={`tableData.${$index}.largeCategoryName`}>
                    <div>
                      {target.dialogForm.tableData[$index].largeCategoryName}
                    </div>
                  </el-form-item >
                );
              } else {
                return (
                  <el-form-item prop={`tableData.${$index}.largeCategoryCode`} rules={target.tableForm.rules.largeCategoryCode}>
                    <HpSelect
                      value={target.dialogForm.tableData[$index].largeCategoryName}
                      vOn:input={(e) => {
                        target.dialogForm.tableData[$index].largeCategoryCode = e.id;
                        target.dialogForm.tableData[$index].largeCategoryName = e.dicName;
                      }}
                      options={target.selectOptions.wzLargeCategory} />
                  </el-form-item >
                );
              }
            }
          },
          {
            prop: "middleCategoryName",
            label: "物资中类",
            align: "center",
            tooltip: true,
            "min-width": "100px",
            render: (h, { row, $index }) => {
              if (target.requestDialog.disableKeys.includes("middleCategoryName")) {
                return (
                  <el-form-item prop={`tableData.${$index}.middleCategoryName`}>
                    <div>
                      {target.dialogForm.tableData[$index].middleCategoryName}
                    </div>
                  </el-form-item >
                );
              } else {
                return (
                  <el-form-item prop={`tableData.${$index}.middleCategoryCode`} rules={target.tableForm.rules.middleCategoryCode}>
                    <HpSelect
                      value={target.dialogForm.tableData[$index].middleCategoryName}
                      vOn:input={(e) => {
                        target.dialogForm.tableData[$index].middleCategoryCode = e.id;
                        target.dialogForm.tableData[$index].middleCategoryName = e.dicName;
                      }}
                      options={target.selectOptions.middleCategory} />
                  </el-form-item >
                );
              }
            }
          },
          {
            prop: "smallCategoryName",
            label: "物资小类",
            align: "center",
            tooltip: true,
            "min-width": "100px",
            render: (h, { row, $index }) => {
              if (target.requestDialog.disableKeys.includes("smallCategoryName")) {
                return (
                  <el-form-item prop={`tableData.${$index}.smallCategoryName`}>
                    <div>
                      {target.dialogForm.tableData[$index].smallCategoryName}
                    </div>
                  </el-form-item >
                );
              } else {
                return (
                  <el-form-item prop={`tableData.${$index}.smallCategoryCode`} rules={target.tableForm.rules.smallCategoryCode}>
                    <HpSelect
                      value={target.dialogForm.tableData[$index].smallCategoryName}
                      vOn:input={(e) => {
                        target.dialogForm.tableData[$index].smallCategoryCode = e.id;
                        target.dialogForm.tableData[$index].smallCategoryName = e.dicName;
                        console.log(1, target.dialogForm.tableData[$index]);
                      }}
                      options={target.selectOptions.wzSmallCategory} />
                  </el-form-item >
                );
              }
            }
          },
          {
            prop: "count",
            label: "需求数量",
            align: "center",
            "min-width": "80px",
            render: (h, { row, $index }) => {
              if (target.requestDialog.disableKeys.includes("count")) {
                return (
                  <el-form-item prop={`tableData.${$index}.count`}>
                    <div>
                      {target.dialogForm.tableData[$index].count}
                    </div>
                  </el-form-item >
                );
              } else {
                return (
                  <el-form-item prop={`tableData.${$index}.count`}>
                    <el-input-number controls-position='right' type='number' min={0} max={999} resize='none' value={target.dialogForm.tableData[$index].count}
                      vOn:input={(e) => { target.dialogForm.tableData[$index].count = e; }}>
                    </el-input-number>
                  </el-form-item>
                );
              }
            }
          },
          {
            prop: "remark",
            label: "备注",
            align: "center",
            "min-width": "180px",
            render: (h, { row, $index }) => {
              if (target.requestDialog.disableKeys.includes("remark")) {
                return (
                  <el-form-item prop={`tableData.${$index}.remark`}>
                    <div>
                      {target.dialogForm.tableData[$index].remark}
                    </div>
                  </el-form-item >
                );
              } else {
                return (
                  <el-form-item prop={`tableData.${$index}.remark`}>
                    <el-input
                      value={target.dialogForm.tableData[$index].remark}
                      vOn:input={(e) => { target.dialogForm.tableData[$index].remark = e; }}
                    ></el-input>
                  </el-form-item>
                );
              }
            }
          },
          {
            label: "操作",
            align: "center",
            "min-width": "60px",
            render: (h, { row, $index }) => {
              return (
                <div v-show={!target.requestDialog.disableKeys.includes("count")} style='cursor: pointer;'>
                  {$index === target.dialogForm.tableData.length - 1 && (
                    <img
                      {...{
                        class: {},
                        style: {
                          width: "16px",
                          height: "16px",
                          "margin": "10px 10px 0 0"
                        },
                        attrs: {
                          src: require("@/assets/img/listAdd.png")
                        },
                        on: {
                          click: () => {
                            target.dialogForm.tableData.push({
                              largeCategoryCode: "",
                              largeCategoryName: "",
                              middleCategoryCode: "",
                              middleCategoryName: "",
                              smallCategoryCode: "",
                              count: "",
                              remark: ""
                            });
                          }
                        }
                      }}
                    />
                  )
                  }
                  {target.dialogForm.tableData.length > 1 && (
                    <img
                      {...{
                        class: {},
                        style: {
                          width: "16px",
                          height: "16px"
                        },
                        attrs: {
                          src: require("@/assets/img/listReduc.png")
                        },
                        on: {
                          click: () => {
                            target.dialogForm.tableData.splice($index, 1);
                          }
                        }
                      }}
                    />)
                  }
                </div>
              );
            }
          }
        ],
        tableAttr: {
          height: "180px",
          stripe: false,
          border: true,
          fit: true,
          "show-header": true,
          "highlight-current-row": true,
          "cell-style": {
            "font-size": "16px"
          },
          "header-cell-style": {
            "text-align": "center",
            "background-color": "#B1C8F9",
            border: "1px solid #ccc",
            "font-size": "16px"
          }
        }
      }
    },
    formConfig4: {
      formData: [
        {
          type: "select",
          label: "下一步审批人",
          prop: "oApprovalId",
          name: "oApprovalName",
          class: "sjgy",
          options: []
        },
        {
          type: "input",
          label: "填报人",
          prop: "creator",
          class: "third"
        },
        {
          type: "input",
          label: "单位及部门",
          class: "third",
          prop: "creatorUnit"
        },
        {
          type: "dataPicker",
          dateType: "datetime",
          label: "填报时间",
          class: "third",
          prop: "createTime"
        }
      ]
    },
    formConfig5: {
      formData: [
        {
          type: "select",
          label: "下一步审批人",
          prop: "tApprovalId",
          name: "tApprovalName",
          class: "sjgy",
          options: []
        },
        {
          type: "input",
          label: "审批意见",
          prop: "approvalOpinion",
          class: "sjgy"
        },
        {
          type: "input",
          label: "审批人",
          class: "third",
          prop: "approvalUser"
        },
        {
          type: "input",
          label: " 单位及部门",
          class: "third",
          prop: "approvalDept"
        },
        {
          type: "dataPicker",
          dateType: "datetime",
          label: "审批时间",
          class: "third",
          prop: "approvalTime"
        }
      ]
    },
    formConfig6: {
      formData: [
        {
          type: "input",
          label: "审批意见",
          prop: "tApprovalOpintion",
          class: "sjgy"
        },
        {
          type: "input",
          label: "审批人",
          class: "third",
          prop: "tApprovalUser"
        },
        {
          type: "input",
          label: " 单位及部门",
          class: "third",
          prop: "tApprovalDept"
        },
        {
          type: "dataPicker",
          dateType: "datetime",
          label: "审批时间",
          class: "third",
          prop: "tApprovalTime"
        }
      ]
    },
    disableKeys: bianji,
    rules: {
      sourceInfoId: [
        { required: true, message: "请选择响应命令单", trigger: "change" }
      ],
      resourceApplyName: [
        { required: true, message: "请填写资源申请单", trigger: "blur" }
      ],
      applyEvel: [
        { required: true, message: "需求等级", trigger: "change" }
      ],
      acceptUnit: [
        { required: true, message: "受理单位及部门", trigger: "change" }
      ],
      destination: [
        { required: true, message: "目的地点", trigger: "blur" }
      ],
      expectArrivalTime: [
        { required: true, message: "请选择期望到达时间", trigger: "change" }
      ],
      contactId: [
        { required: true, message: "联系人", trigger: "change" }
      ],
      applyDescription: [
        { required: true, message: "需求描述", trigger: "blur" }
      ],
      oApprovalId: [
        { required: true, message: "下一步审批人", trigger: "change" }
      ],
      tApprovalId: [
        { required: true, message: "下一步审批人", trigger: "change" }
      ]
    }
  };
}

